package com.imjohn.service;

import com.imjohn.entity.Comment;
import com.imjohn.mapper.CommentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CommentService {
    @Autowired
    CommentMapper commentMapper;
    /**
     * 插入评论
     * */
    public int AddComment( Comment comment ) {
        return commentMapper.AddComment(comment);
    }
    /**
     * 评论数量更新
     * */
    public int SubReCommentNum(int id) {
        return commentMapper.SubReCommentNum(id);
    }
    /**
     * 点赞减1
     * */
    public int subParseNum(int id) {
        return commentMapper.subParseNum(id);
    }
    /**
     * 点赞加1
     * */
    public int addParseNum(int id) {
        return commentMapper.addParseNum(id);
    }

}
